Think Stats by Allen B. Downey

Think Stats by Allen B. Downey

Author:Allen B. Downey
Language: eng
Format: mobi, epub, pdf
Tags: COMPUTERS / Data Modeling & Design
Publisher: O'Reilly Media
Published: 2011-07-04T16:00:00+00:00


Example 6-3.

The Internal Revenue Service of the United States (IRS) provides data about income taxes, and other statistics, at http://irs.gov/taxstats. If you did Example 36, you have already worked with this data; otherwise, follow the instructions there to extract the distribution of incomes from this dataset.

What fraction of the population reports a taxable income below the mean?

Compute the median, mean, skewness, and Pearson’s skewness of the income data. Because the data has been binned, you will have to make some approximations.

The Gini coefficient is a measure of income inequality. Read about it at http://wikipedia.org/wiki/Gini_coefficient and write a function called Gini that computes it for the income distribution.

Hint: use the PMF to compute the relative mean difference (see http://wikipedia.org/wiki/Mean_difference).

You can download a solution to this exercise from http://thinkstats.com/gini.py.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.